Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added spending plans for testing on testnet. #3136

Closed

Conversation

ebadiere
Copy link
Collaborator

feat: Moved create aliases script to the sctrips directory.

Description:
This PR replaces PR #3116 with minimal package.json changes.

Related issue(s):

Fixes #3111

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Signed-off-by: ebadiere <[email protected]>

feat: Moved create aliases script to the sctrips directory.

Signed-off-by: ebadiere <[email protected]>

feat: Moved create alias accounts script to root ./scripts directory.

Signed-off-by: ebadiere <[email protected]>
@ebadiere ebadiere requested review from AlfredoG87, Nana-EC and a team as code owners October 21, 2024 17:05
@ebadiere ebadiere self-assigned this Oct 21, 2024
@ebadiere ebadiere added the enhancement New feature or request label Oct 21, 2024
@ebadiere ebadiere added this to the 0.59.0 milestone Oct 21, 2024
Copy link

github-actions bot commented Oct 21, 2024

Acceptance Tests

  20 files  269 suites   38m 46s ⏱️
599 tests 569 ✔️ 4 💤 26
808 runs  774 ✔️ 6 💤 28

Results for commit 1fadbab.

♻️ This comment has been updated with latest results.

Copy link

sonarcloud bot commented Oct 22, 2024

Copy link

🚨 Memory Leak Detected 🚨

A potential memory leak has been detected in the test titled validates enforcement of request id. This may impact the application's performance and stability.

Details

📊 Memory Leak Detection Report 📊

GC Type: MarkSweepCompact
Cost: 32,237.8 ms

Heap Statistics (before vs after executing the test):

  • Total Heap Size: increased with 1.46 MB
  • Total Heap Size Executable: no changes
  • Total Physical Size: decreased with 348.16 KB
  • Total Available Size: decreased with 11.79 MB
  • Total Global Handles Size: no changes
  • Used Global Handles Size: decreased with 64.00 bytes
  • Used Heap Size: decreased with 3.39 MB
  • Heap Size Limit: no changes
  • Malloced Memory: decreased with 26.58 KB
  • External Memory: no changes
  • Peak Malloced Memory: no changes

Heap Space Statistics (before vs after executing the test):

  • Old Space:

    • Space Size: increased with 1.84 MB
    • Space Used Size: increased with 2.12 MB
    • Space Available Size: decreased with 15.01 MB
    • Physical Space Size: increased with 1.84 MB
  • Large Object Space:

    • Space Size: increased with 835.58 KB
    • Space Used Size: increased with 813.50 KB
    • Space Available Size: no changes
    • Physical Space Size: increased with 835.58 KB

Recommendations

Please investigate the memory allocations in this test, focusing on objects that are not being properly deallocated.

Copy link

Tests

       3 files     398 suites   18s ⏱️
1 417 tests 1 416 ✔️ 1 💤 0
1 426 runs  1 425 ✔️ 1 💤 0

Results for commit 1fadbab.

Copy link
Member

@quiet-node quiet-node left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines +50 to +68
const privateKey = PrivateKey.generateECDSA();
const publicKey = privateKey.publicKey;

console.log(`Generated ECDSA Private Key: ${privateKey.toStringRaw()}`);
console.log(`Generated ECDSA Public Key: ${publicKey.toStringRaw()}`);

const ethereumAddress = publicKey.toEthereumAddress();

console.log(`Ethereum Address: 0x${ethereumAddress.toString()}`);

const aliasAccountId = AccountId.fromEvmAddress(0, 0, ethereumAddress);

const transferTx = await new TransferTransaction()
.addHbarTransfer(operatorAccountId, initialBalanceTinybar.negated())
.addHbarTransfer(aliasAccountId, initialBalanceTinybar)
.execute(client);

const receipt = await transferTx.getReceipt(client);
console.log(`Transfer Transaction Status: ${receipt.status.toString()}`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works fine, but I've seen the AccountCreateTransaction API used before, like this:

TransactionResponse newAccount = new AccountCreateTransaction()
     .setKey(newAccountPublicKey)
     .setInitialBalance(Hbar.fromTinybars(1000))
     .execute(client);

Just a suggestion—no need to change anything!

Copy link
Collaborator

@natanasow natanasow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ebadiere
Copy link
Collaborator Author

ebadiere commented Nov 1, 2024

Covered by #3201

@ebadiere ebadiere closed this Nov 1, 2024
Copy link

codecov bot commented Nov 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.69%. Comparing base (34ec5a2) to head (1fadbab).
Report is 30 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3136      +/-   ##
==========================================
+ Coverage   82.11%   82.69%   +0.58%     
==========================================
  Files          65       62       -3     
  Lines        4355     4195     -160     
  Branches      859      821      -38     
==========================================
- Hits         3576     3469     -107     
+ Misses        526      483      -43     
+ Partials      253      243      -10     
Flag Coverage Δ
relay 85.00% <ø> (ø)
server 83.48% <ø> (ø)
ws-server 36.15% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 15 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
3 participants